10. Transactions
Transactions
ND004 C01 L02 14 Transactions
Takeaways
- Databases are interacted using client-server interactions, over a network
- Postgres uses TCP/IP to be interacted with, which is connection-based
- We interact with databases like Postgres during sessions
- Sessions have transactions that commit work to the database
Transactions capture logical bundles of work.
Work is bundled into transactions, so that in case of system failures, data in your database is still kept in a valid state (by rolling back the entire transaction if any part of it fails). To ensure a database is consistent before and after work is done to it, databases uses atomic transactions, and actions like commits and rollbacks to handle failures appropriately. Transactions are, in other words, ACID .
Resource on ACID Properties
See: ACID Properties in DBMS on GeeksforGeeks.org
Transactions
SOLUTION:
atomic units of work for the database to perform as a wholeSOLUTION:
FalseTransaction statements
SOLUTION:
- UPDATE
- INSERT
- DELETE